package com.gmadmin.entity.vo.api;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 * @author zhangliang
 * @version 1.0
 * @date 2022/1/5 12:52
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class SysApiVo {

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("api名称")
    private String apiName;

    @ApiModelProperty("api地址")
    private String path;

    @ApiModelProperty("请求方法")
    private String method;

    @ApiModelProperty("请求数据类型")
    private String requestDataType;

    @ApiModelProperty("响应数据类型")
    private String responseDataType;

    @ApiModelProperty("请求参数")
    private String requestParameters;

    @ApiModelProperty("响应状态")
    private String responseStatus;

    @ApiModelProperty("响应参数")
    private String responseParameters;

    @ApiModelProperty("响应示例")
    private String responseExample;

    @ApiModelProperty("是否白名单,1是，0不是")
    private Boolean yIgnore;

    @ApiModelProperty("创建者")
    private String createBy;

    @ApiModelProperty("更新着")
    private String updateBy;

    @ApiModelProperty("创建日期")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getApiName() {
        return apiName;
    }

    public void setApiName(String apiName) {
        this.apiName = apiName;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getRequestDataType() {
        return requestDataType;
    }

    public void setRequestDataType(String requestDataType) {
        this.requestDataType = requestDataType;
    }

    public String getResponseDataType() {
        return responseDataType;
    }

    public void setResponseDataType(String responseDataType) {
        this.responseDataType = responseDataType;
    }

    public String getRequestParameters() {
        return requestParameters;
    }

    public void setRequestParameters(String requestParameters) {
        this.requestParameters = requestParameters;
    }

    public String getResponseStatus() {
        return responseStatus;
    }

    public void setResponseStatus(String responseStatus) {
        this.responseStatus = responseStatus;
    }

    public String getResponseParameters() {
        return responseParameters;
    }

    public void setResponseParameters(String responseParameters) {
        this.responseParameters = responseParameters;
    }

    public String getResponseExample() {
        return responseExample;
    }

    public void setResponseExample(String responseExample) {
        this.responseExample = responseExample;
    }

    public Boolean getyIgnore() {
        return yIgnore;
    }

    public void setyIgnore(Boolean yIgnore) {
        this.yIgnore = yIgnore;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @ApiModelProperty(value = "菜单树显示label")
    public String getLabel() {
        return apiName+"["+path+"]["+method+"]";
    }
//    @ApiModelProperty(value = "菜单树是否禁用")
//    public Boolean getDisabled(){
//        return e
//    }

}
